display-x11: Unset tiled state if _GTK_EDGE_CONSTRAINTS is supported
authorGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>
Wed, 4 Oct 2017 18:33:15 +0000 (15:33 -0300)
committerTimm Bäder <mail@baedert.org>
Sat, 20 Jan 2018 12:10:42 +0000 (13:10 +0100)
Commit c415bef5de introduced support for the new _GTK_EDGE_CONSTRAINTS
atom. If the compositor supports that atom, however, we were always
setting the tiled state, even if no actual tiling information is
available, where the correct action is to completely remove any traces
of the tiled state.

Fix that by correctly removing the tiled state when compositor supports
_GTK_EDGE_CONSTRAINTS Xatom.

https://bugzilla.gnome.org/show_bug.cgi?id=788516

gdk/x11/gdkdisplay-x11.c

index fedfada7c167cf47bf6bc24a11daf728e3131e41..84a1b2f1ae4bc40b6611442ca963334104795a85 100644 (file)
@@ -236,10 +236,8 @@ do_edge_constraint_state_check (GdkWindow      *window,
     }
   else
     {
-      if (!(old_state & GDK_WINDOW_STATE_TILED))
-        {
-          local_set |= GDK_WINDOW_STATE_TILED;
-        }
+      if (old_state & GDK_WINDOW_STATE_TILED)
+        local_unset |= GDK_WINDOW_STATE_TILED;
     }
 
   /* Top edge */